<?php echo $this->Form->input('id', array('type' => 'hidden'));?>
<table class="scheduleForm">
	<tr>
		<td class="left"><label for="CourseTitle">新しいクラスの名前</label></td>
		<td>
			<?php echo $this->Form->input('title', array('div' => false, 'label' => false, 'class' => 'jsCourseTitle text', 'id' => 'CourseTitle', 'placeholder' => 'クラスの名前を25文字程度で入れてください'));?>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CourseDescription">クラスの内容について</label></td>
		<td>
			<?php echo $this->Form->input('description', array('div' => false, 'label' => false, 'class' => 'jsCourseDescription textarea', 'id' => 'CourseDescription', 'type' => 'textarea', 'value' => $this->Form->value('description') ? $this->Form->value('description') : "具体的に記入してください！\n\n◆このクラスではこのようなことを教えます\n\n◆このクラスを通じてこのようなことができるようになります\n\n◆当日の流れ・シラバスなど\n\n◆その他注意事項"));?>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CourseTargetUser">こんな方におすすめです</label></td>
		<td>
			<?php echo $this->Form->input('target_user', array('div' => false, 'label' => false, 'class' => 'jsCourseTargetUser textarea', 'id' => 'CourseTargetUser', 'type' => 'textarea', 'placeholder' => '例）○○に興味がある方、○○を始めたいけどきっかけがない方'));?>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CourseType">クラスの種類</label></td>
		<td>
			<input type="hidden" name="data[Course][course_type]" id="CourseCourseType_" value="" />
			<ul class="courseType">
				<?php foreach ($courseTypes as $type):?>
				<li>
					<input type="radio" name="data[Course][course_type]"
								 id="CourseCourseType<?php echo $type['CourseType']['id'];?>"
								 value="<?php echo $type['CourseType']['id'];?>"
								 <?php if ($this->Form->value('course_type') == $type['CourseType']['id']):?>checked="checked"<?php endif;?>
						/>
					<label for="CourseCourseType<?php echo $type['CourseType']['id'];?>">
						<p class="types"><?php echo $type['CourseType']['type'];?><!- course type name --></p>
						<p class="description"><?php echo $type['CourseType']['description'];?><!- course type description --></p>
					</label>
				</li>
				<?php endforeach;?>
			</ul>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CourseCategory">カテゴリーを選択する</label></td>
		<td>
			<?php echo $this->Form->input('category', array('div' => false, 'label' => false, 'options' => $categories, 'class' => 'jsCourseCategory', 'id' => 'CourseCategory'));?>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CourseArea">開催エリア</label></td>
		<td>
			<?php echo $this->Form->input('area', array('div' => false, 'label' => false, 'options' => $areas, 'class' => 'jsCourseArea', 'id' => 'CourseArea'));?>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CourseTag">クラスのタグ</label></td>
		<td>
			タグは半角カンマで区切って入力してください<br />例：　◯　犬,猫　×　犬、猫<br/>
			<?php echo $this->Form->input('tag', array('div' => false, 'label' => false, 'class' => 'jsCourseTag text', 'id' => 'CourseTag'));?>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="CoursePrice">参加費用</label></td>
		<td>
			<?php echo $this->Form->input('price', array('div' => false, 'label' => false, 'class' => 'jsCoursePrice text', 'id' => 'CoursePrice'));?>円
		</td>
	</tr>
	<tr>
		<td class="left" rowspan="3"><label for="CourseImage01">クラス イメージ画像</label></td>
		<td>
			<?php if (isset($this->data['Course']['course_image01']) && is_string($this->data['Course']['course_image01']) && $this->data['Course']['course_image01']):?>
			<div><?php echo $this->Html->image(Configure::read('Course.upload_path_prefix').$this->data['Course']['course_image01'], array('height' => 200));?></div>
			<?php endif;?>
			<?php echo $this->Form->input('course_image01', array('div' => false, 'label' => false, 'type' => 'file', 'class' => 'jsCourseImage01', 'id' => 'CourseImage01', 'placeholder' => ''));?>
		</td>
	</tr>
	<tr>
		<td>
			<?php if (isset($this->data['Course']['course_image02']) && is_string($this->data['Course']['course_image02']) && $this->data['Course']['course_image02']):?>
			<ul>
				<li><?php echo $this->Html->image(Configure::read('Course.upload_path_prefix').$this->data['Course']['course_image02'], array('height' => 200));?></li>
				<li><label for="CourseDeleteImage02">
					<?php echo $this->Form->input('delete_image02', array('value' => 1, 'div' => false, 'type' => 'checkbox', 'label' => false));?>
					この画像を削除する
				</label></li>
			</ul>
			<?php endif;?>
			<?php echo $this->Form->input('course_image02', array('div' => false, 'label' => false, 'type' => 'file', 'class' => 'jsCourseImage02', 'id' => 'CourseImage02'));?>
		</td>
	</tr>
	<tr>
		<td>
			<?php if (isset($this->data['Course']['course_image03']) && is_string($this->data['Course']['course_image03']) && $this->data['Course']['course_image03']):?>
			<ul>
				<li><?php echo $this->Html->image(Configure::read('Course.upload_path_prefix').$this->data['Course']['course_image03'], array('height' => 200));?></li>
				<li><label for="CourseDeleteImage03">
					<?php echo $this->Form->input('delete_image03', array('value' => 1, 'div' => false, 'type' => 'checkbox', 'label' => false));?>
					この画像を削除する
				</label></li>
			</ul>
			<?php endif;?>
			<?php echo $this->Form->input('course_image03', array('div' => false, 'label' => false, 'type' => 'file', 'class' => 'jsCourseImage03', 'id' => 'CourseImage03'));?>
		</td>
	</tr>
	<?php // if edit course, show submit button here
	if(!isset($isAdd)): 
	?>
	<tr>
		<td colspan="2" class="submit">
			<?php echo $this->Form->submit('btn_confirm_course_off.png', array('div' => false, 'class' => 'btnSubmit', 'id' => 'confirmStep1'));?>&nbsp;
			<?php echo $this->Form->submit('btn_cancel_off.png', array('div' => false, 'class' => 'jsBtnBack'));?>
		</td>
	</tr>
	<?php endif; ?>
</table>
<?php // if add course, include element add_schedule
	if(isset($isAdd) && $isAdd == true): 
	echo $this->element('course/add_schedule_table_form');
?>
	<div class="submit text-align-center " style="margin-top: 12px;">
		<?php if($isAddSchedule == 0): ?>
		<a href="javascript:void(0)" id="showScheduleForm" >初回のスケジュールを併せて登録する</a><br/><br/>
		<?php endif; ?>
		<?php echo $this->Form->submit('btn_confirm_course_off.png', array('div' => false, 'class' => 'btnSubmit', 'id' => 'confirmStep1'));?>&nbsp;
		<?php echo $this->Form->submit('btn_cancel_off.png', array('div' => false, 'class' => 'jsBtnBack'));?>
	</div>
<?php endif; ?>
